var e = require;
var t = module;
var n = exports;
var o,
    i =
        (this && this.__extends) ||
        ((o = function (e, t) {
            return (o =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
                })(e, t);
        }),
        function (e, t) {
            function n() {
                this.constructor = e;
            }
            o(e, t), (e.prototype = null === t ? Object.create(t) : ((n.prototype = t.prototype), new n()));
        }),
    r =
        (this && this.__decorate) ||
        function (e, t, n, o) {
            var i,
                r = arguments.length,
                a = r < 3 ? t : null === o ? (o = Object.getOwnPropertyDescriptor(t, n)) : o;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, o);
            else
                for (var s = e.length - 1; 0 <= s; s--)
                    (i = e[s]) && (a = (r < 3 ? i(a) : 3 < r ? i(t, n, a) : i(t, n)) || a);
            return 3 < r && a && Object.defineProperty(t, n, a), a;
        };
Object.defineProperty(n, "__esModule", {value: !0});
var a,
    s = e("base-panel"),
    t = cc._decorator,
    e = t.ccclass,
    t = t.property,
    e =
        ((a = s.default),
        i(c, a),
        (c.prototype.init = function () {}),
        (c.prototype.updateDisplay = function () {
            var e;
            (this.titleLabel.string = this.options.title || "提示"),
                (this.contentLabel.string = this.options.content || ""),
                (this.cancelButton.node.active = null === (e = this.options.showCancel) || void 0 === e || e),
                (this.cancelButton.getComponentInChildren(cc.Label).string =
                    null !== (e = this.options.cancelText) && void 0 !== e ? e : "取消"),
                (this.confirmButton.getComponentInChildren(cc.Label).string =
                    null !== (e = this.options.confirmText) && void 0 !== e ? e : "确定"),
                (this.closeButton.active = null === (e = this.options.showClose) || void 0 === e || e);
        }),
        (c.prototype.onConfirmTap = function () {
            this.setReturnValue(!0), this.hide();
        }),
        (c.prototype.onCancelTap = function () {
            this.setReturnValue(!1), this.hide();
        }),
        r([t(cc.Label)], c.prototype, "titleLabel", void 0),
        r([t(cc.Label)], c.prototype, "contentLabel", void 0),
        r([t(cc.Button)], c.prototype, "confirmButton", void 0),
        r([t(cc.Button)], c.prototype, "cancelButton", void 0),
        r([t(cc.Node)], c.prototype, "closeButton", void 0),
        r([e], c));
function c() {
    var e = (null !== a && a.apply(this, arguments)) || this;
    return (
        (e.titleLabel = null),
        (e.contentLabel = null),
        (e.confirmButton = null),
        (e.cancelButton = null),
        (e.closeButton = null),
        e
    );
}
n.default = e;
